package com.serv.admin.sys;

import com.jfinal.aop.Inject;
import com.jfinal.plugin.activerecord.Page;
import com.serv.common.base.BaseController;
import com.serv.common.model.sys.Role;
import com.serv.common.service.sys.RoleService;

public class RoleController extends BaseController {
	@Inject
	RoleService roleService;
	
	public void index(){
		keepPara();
		int pageNum = getParaToInt("pageNum",1);
		int pageSize = getParaToInt("numPerPage",50);
		Page<Role> page = roleService.paginate(pageNum,pageSize,getConditions());
		setAttr("page",page);
		render("index.html");
	}
	
	public void add(){
		render("add.html");
	}
	
	public void create(){
		renderJson();
	}
	
	public void edit(){
		render("edit.html");
	}
	
	public void update(){
		renderJson();
	}
	
	public void delete(){
		renderJson();
	}
}
